//
//  MZRootViewController.m
//  MZ_CT
//
//  Created by lanou3g on 15/12/15.
//  Copyright © 2015年 lanou3g. All rights reserved.
//

#import "MZRootViewController.h"
#import "MZDrawerViewController.h"
#import "MZBaseViewController.h"
#import "MZBaseRootViewController.h"
@interface MZRootViewController ()
@property (nonatomic, strong)MZBaseRootViewController *baseRootVC;

@end

@implementation MZRootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    MZDrawerViewController *drawerVC = [MZDrawerViewController shareDrawerVC];
    [self addChildViewController:drawerVC];
    [self.view insertSubview:drawerVC.view atIndex:0];
    
    self.baseRootVC = [[MZBaseRootViewController alloc] init];
    MZBaseViewController *baseVC = [[MZBaseViewController alloc] initWithRootViewController:self.baseRootVC];
    [self addChildViewController:baseVC];
    [self.view insertSubview:baseVC.view atIndex:1];
    drawerVC.delegate = self.baseRootVC;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/



@end
